package com.ehome.poct.base.api.feign;

import com.ehome.poct.base.api.dto.doctor.ClinicDTO;
import com.ehome.poct.base.api.dto.doctor.TermClinicDTO;
import com.ehome.poct.base.api.vo.clinic.TermClinicVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @description:
 * @author: cq
 * @time: 2022/3/15
 */
@FeignClient(value = "${service.poct-base:}${service.suffix.poct-base:}",contextId = "clinic1")
public interface ClinicClient {
    /**
     * 获取诊所信息
     * @param id
     * @return
     */
    @GetMapping("/clinic/getByClinicId/{id}")
    ClinicDTO getById(@PathVariable(value = "id")Long id);

    @PutMapping({"/term_clinic/{id}"})
    void update(@PathVariable("id") Long id, @RequestBody TermClinicDTO dto);

    @GetMapping("/term_clinic/one")
    TermClinicVO getOne(@SpringQueryMap TermClinicDTO termClinicDTO);
}
